<template>
	<view class="rule" :class="[showTxt?'ruleLogin':'']">
		<radio @tap="uncheck" value="cb" :checked="isCheck" color="red" style="transform:scale(0.7); position: relative; top: -2rpx;" />
		我已阅读并同意 <navigator url="/pages/rule/userStatement" class="link"> 《用户使用协议》</navigator><navigator url="/pages/rule/privacyAgreement" class="link"> 《用户隐私协议》</navigator>
	</view>
</template>

<script>
	export default {
		props: {
			value: Boolean,
			isCheckFlag:{
				type:Boolean,
				default:true
			}
		},
		data() {
			return {
				isCheck: true,
				showTxt:false
			}
		},
		mounted() {
			this.isCheck=this.isCheckFlag;
			this.showTxt=!this.isCheckFlag;
			this.$emit('input', this.isCheck)
		},
		watch: {
			isCheck (value) {
				this.$emit('input', this.isCheck)
			}
		},
		computed: {
		},
		methods: {
			uncheck () {
				this.isCheck = !this.isCheck
			},
			checkChange (e) {
				
			}
		}
	}
</script>

<style lang="scss" scoped>
.rule {
	font-size: 24rpx;
	text-align: center;
	&.ruleLogin{
		
		position: fixed;
		bottom:168rpx;
		width: 100%;
		left:50%;
		transform: translateX(-50%);
	}
	.link {
		display: inline;
		color: red;
		text-decoration: underline;
	}
}
</style>
